package io.babystar.modules.business.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.babystar.common.utils.PageUtils;
import io.babystar.common.utils.Query;

import io.babystar.modules.business.dao.StudentCourseDateDao;
import io.babystar.modules.business.entity.StudentCourseDateEntity;
import io.babystar.modules.business.service.StudentCourseDateService;


@Service("studentCourseDateService")
public class StudentCourseDateServiceImpl extends ServiceImpl<StudentCourseDateDao, StudentCourseDateEntity> implements StudentCourseDateService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<StudentCourseDateEntity> page = this.page(
                new Query<StudentCourseDateEntity>().getPage(params),
                new QueryWrapper<StudentCourseDateEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public Integer getStudentAppointCount(Map<String, Object> params){
        return this.baseMapper.getStudentAppointCount(params);
    }

}